#define _CRT_SECURE_NO_WARNINGS 1
#include<stdbool.h>
bool is_leap_year(int y)
{
	if ((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0))
		return true;
	else
		return false;
}

int a_day_of_month(int y, int m)
{
	int day[] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
	int d = day[m];
	if (is_leap_year(y))
	{
		d += 1;
	}
	return d;
}